import React from 'react';

export default class ClickCounter extends React.Component {

    constructor(props) {
        super(props);
        // this.onClickButton = this.onClickButton.bind(this);
        this.state = {
            count: 0
        }
    }

    onClickButton() {
        this.setState({
            count: this.state.count + 1
        })
    }

    render() {
        return (
            <div>
                <p>{this.state.count}</p>
                {/* <button onClick={ this.onClickButton } >Click Me</button> */}
            </div>
        )
    }
}